Skip to main content

Chatflow

The Chatflow module in DigiSquares lets you design, manage, and run conversational AI workflows powered by OpenAI models. You can create multiple voiceflow, each with its own set of triggers and sub-flows, test them in real time, and hook them into your application.


1. Chatflow List View

The Phrases feature is designed to help users initiate discussions or conversations on a given topic by providing a set of natural language examples. These examples are typically 8 to 9 phrases or sentences generated through advanced language models. The phrases serve as conversational starters, guiding users on how to articulate ideas, questions, or statements relevant to the topic at hand.

This feature is especially useful in scenarios where users may be unsure how to begin or steer a conversation, helping to break the ice and encourage engagement.

On the Chatflow page you can:

  • See all voiceflow in the current project, with columns:
    • Name: Unique identifier
    • Description: Brief summary of its purpose
    • Actions:
      • 📋 Copy
      • ✏️ Edit
      • 🗑 Delete
  • Search existing voiceflow by name or description.
  • Create New Chatflow by clicking the + New chatflow button.
  • Test Spark runs all voiceflow end-to-end in a sandbox environment.

2. Creating a New Chatflow

Click + New chatflow to open the Properties dialog:

FieldDescription
Name*Enter a unique name for your chatflow.
Select Model*Choose which OpenAI model to drive the flow:
• GPT-3.5
• GPT-4
Description(Optional) Explain the chatflow’s purpose.

After filling out these fields, click OK to initialize your chatflow.


3. Chatflow Actions Palette

Once inside a chatflow, click the + icon to open the Actions palette:

Root Trigger: ChatTrigger

All voiceflow begin with a ChatTrigger node. Under this root you can add:

  • Phrases Start the conversation when the user’s input matches one of your example phrases.
  • Sub Flow Invoke another chatflow from within this one, allowing modular, reusable dialogs.

4. Configuring Phrase Triggers

Click Phrases to open the phrases editor:

SectionDescription
ModelShows which model is in use (e.g. gpt-3.5-turbo).
Instruction(Optional) Top-level system prompt or instruction for this trigger. Click ✏️ to edit.
Add PhrasesEnter one example phrase at a time (e.g. “hello”, “help me”).
+ Add PhraseAdds the typed phrase to the trigger list.
Your PhrasesDisplays currently configured phrases as removable tags (e.g. chart, dash).

Tip: Provide 8–10 diverse examples per trigger to help the model reliably recognize user intent.


5. Calling Sub-Flows

Click Sub Flow to insert a sub-chatflow node:

FieldDescription
Select Chatflow*Dropdown of all existing voiceflow in the project.
OK / CancelInsert the sub-flow trigger or cancel.

Use Sub Flow to break large conversations into smaller, reusable components.


6. Putting It All Together

A simple chatflow might look like:

├─ Phrases: \[“hello”, “hi there”, “hey”]
│ └─ Message: “Hello! How can I help you today?”
└─ Phrases: \[“goodbye”, “bye”]
└─ Message: “Goodbye! Have a great day.”

Or, to delegate part of the conversation:

└─ Sub Flow: “order-status-check”

7. Best Practices & Tips

  • Name Clearly: Use descriptive names (OrderStatusFlow, SupportGreeting).
  • Limit Phrases: 8–10 well-chosen examples per trigger.
  • Leverage Sub-Flows: Modularize repeatable dialog segments.
  • System Instructions: Use the Instruction field to give high-level guidance (tone, persona).
  • Test Regularly: Click Test Spark after major edits to validate behavior end-to-end.

With Chatflow’s visual editor and OpenAI integration, you can rapidly build, iterate, and deploy sophisticated conversational experiences—without writing a single line of runtime code.